<template>
	<div class="user-box">
		<van-sticky>
			<div class="stickyDiv">
				<p class="leftBox" @click="goBack">
					<span style="margin-right: 10px;color: rgb(81,164,208);">
						<van-icon name="arrow-left" />
					</span>
					<span style="color: rgb(81,164,208);">返回</span>
				</p>
				<p>
					{{prop.name}}
				</p>
			</div>
		</van-sticky>
	</div>
</template>

<script setup>
	import {
		defineProps
	} from 'vue'
	const prop = defineProps({
		name: {
			type: String,
			default: ''
		}
	})
	const goBack = () => {
		window.history.back();
	}
</script>

<style lang="scss" scoped>
	.stickyDiv {
		display: flex;
		height: 3em;
		align-items: center;
		justify-content: center;
		background-color: #ffffff;
		color: var(--van-nav-bar-title-text-color);
		font-weight: var(--van-font-bold);
		font-size: var(--van-nav-bar-title-font-size);
		border-bottom: 1px solid rgb(247, 248, 250);

		.leftBox {
			position: fixed;
			left: 0;
			padding: 0 0 0 10px;
			cursor: pointer;
		}
	}
</style>